package com.tracking.locon;

import android.app.ListActivity;
import android.os.Bundle;
import android.widget.ArrayAdapter;
import android.widget.ListAdapter;
import android.widget.ListView;

public class TrackNearbyList extends ListActivity {
	
	private ListView mNearbyList;
	private String[] mNearbyArray;
	
	public TrackNearbyList(ListView listView){

	}
	
	@Override
    protected void onCreate(Bundle savedInstanceState){
		super.onCreate(savedInstanceState);

		mNearbyList = (ListView) findViewById(R.id.lvFriendNearby);
		ListAdapter adapter = createAdapter();
		mNearbyList.setAdapter(adapter);
	}
	
	/*
	 * Create and return List Adapter 
	 */
	protected ListAdapter createAdapter(){
		mNearbyArray = new String[]{
				"Android", "iPhone", "Windows Phone"
		};
		ArrayAdapter<String> adapter = new ArrayAdapter<String>(this,
				  android.R.layout.simple_list_item_1, android.R.id.text1, mNearbyArray);
		return adapter;
	}
}
